﻿<UserControl x:Class="Mimic.ThumbControl"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Mimic="clr-namespace:Mimic"
			 VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
			 LayoutUpdated="ThumbControl_LayoutUpdated" Unloaded="ThumbControl_Unloaded" >
    <UserControl.Resources>
        <Mimic:TrueFalseIconConverter x:Key="TrueFalseIconConverter" />
    </UserControl.Resources>
    <UserControl.ContextMenu>
        <ContextMenu Name="ThumbContextMenu" >
            <MenuItem Click="miEnlargement_Click" >
                <MenuItem.Icon>
                    <Image Source="/Mimic;component/Resources/arrow_out.png" />
                </MenuItem.Icon>
                <MenuItem.Header>
                    <WrapPanel>
                        <Image Source="{Binding AllowEnlargement, Converter={StaticResource TrueFalseIconConverter}, Mode=OneWay}" />
                        <Label Content="Allow Enlargement" />
                    </WrapPanel>
                </MenuItem.Header>
            </MenuItem>
            <MenuItem Click="miReducing_Click" >
                <MenuItem.Icon>
                    <Image Source="/Mimic;component/Resources/arrow_in.png" />
                </MenuItem.Icon>
                <MenuItem.Header>
                    <WrapPanel>
                        <Image Source="{Binding AllowReducing, Converter={StaticResource TrueFalseIconConverter}, Mode=OneWay}" />
                        <Label Content="Allow Reducing" />
                    </WrapPanel>
                </MenuItem.Header>
            </MenuItem>
            <MenuItem Click="miAutoZoom_Click" >
                <MenuItem.Icon>
                    <Image Source="/Mimic;component/Resources/zoom.png" />
                </MenuItem.Icon>
                <MenuItem.Header>
                    <WrapPanel>
                        <Image Source="{Binding AutoZoom, Converter={StaticResource TrueFalseIconConverter}, Mode=OneWay}" />
                        <Label Content="Auto Zoom" />
                    </WrapPanel>
                </MenuItem.Header>
            </MenuItem>
            <Separator />
            <MenuItem Header="(un)Minimize in tray" Click="miMinInTray_Click" IsEnabled="{Binding AllowMinimizeInTray, Mode=OneWay}" >
                <MenuItem.Icon>
                    <Image Source="/Mimic;component/Resources/application_put.png" />
                </MenuItem.Icon>
            </MenuItem>
        </ContextMenu>
    </UserControl.ContextMenu>
    <Grid Background="Transparent" x:Name="ThumbCtrl" />
</UserControl>
